/**
 */
import { defineStore } from 'pinia'
import store from '@/store'

export const useAppStore = defineStore('app', {
  state: () => {
    return {
      pageLoading: false
    }
  },
  actions: {
    setPageLoading (loading: boolean) {
      this.pageLoading = loading
    }
  }
})

export default useAppStore

// 在组件外使用
export function useAppStoreOutside () {
  return useAppStore(store)
}
